import request from "@/utils/request.js";

/**
 *
 * 订单接口
 *
 */

/**
 * 类目
 * @param data
 * @returns {*}
 */
export function typeList() {
  return request.get(`/campus/product/typeList`);
}

export function getNewList(params) {
  return request.get(`/campus/product/newList`,params,{noAuth: true});
}


/**
 * 待接单列表
 *
 */
export function productList(data) {
  return request.get('/campus/product/pageList', data, {noAuth: true});
}

export function detail(no) {
  return request.get('/campus/product/detail/'+no, null, {noAuth: true});
}

export function editDetail(no) {
  return request.get('/campus/product/edit/'+no, null, {noAuth: true});
}



export function myProductList(data) {
  return request.get('/campus/product/getMyProduct', data, {noAuth: true});
}



export function productDetail(id) {
  return request.get('/campus/product/detail/'+id, null, {noAuth: true});
}
export function productView(id) {
  return request.post('/campus/product/view/?'+id, null, {noAuth: true});
}


export function updateStatus(data) {
  return request.post('/campus/product/updateStatus', data, {noAuth: true});
}

export function addProduct(data) {
  return request.post('/campus/product/save', data, {noAuth: true});
}

export function updateProduct(data) {
  return request.post('/campus/product/update', data, {noAuth: true});
}
export function updatePolish(data) {
  return request.post('/campus/product/polish', data, {noAuth: true});
}
export function deleteProduct(id) {
  return request.post('/campus/product/'+id, data, {noAuth: true});
}
